import { Children, lazy } from "react";
import { createBrowserRouter } from 'react-router-dom'

const Home = lazy(() => import('../parge/Home/Home'))
const Index = lazy(() => import('../parge/Index/index'))
const Detail = lazy(() => import('../parge/Detail/Detail'))
const Search = lazy(() => import('../parge/Search/Search'))
const SearchList = lazy(() => import('../parge/Searchlist/Searchlist'))


const router = createBrowserRouter([
    {
        path: '/',
        element: <Home></Home>
    },
    {
        path: '/index',
        element: <Index></Index>
    },
    {
        path: '/detail',
        element: <Detail></Detail>
    }, {
        path: '/search',
        element: <Search></Search>
    },
    {
        path: '/searchlist',
        element: <SearchList></SearchList>
    }
])

export default router